#include <unistd.h>
#include <ZetaDisplayInterface.h>
#include "RtspClient.h"
#include "MediaPlayer.h"

using namespace zeta;

int main(int argc, char **argv) {
	ViewInfo sur;
	sur.x = 0;
	sur.y = 0;
	sur.w = 480;
	sur.h = 272;
	ZetaDisplay* zeta_disp_ = new ZetaDisplay(0, &sur);
	MediaPlayer* media_player_ = new MediaPlayer();
	media_player_->setDisplay(zeta_disp_->getHandle());
	media_player_->prepare();
	sleep(2);
	media_player_->start();
	sleep(2);
	RtspClient client_ = new RtspClient();
	client_->SendToDecode = std::bind(&MediaPlayer::SendToDecodeFunction, media_player_, std::placeholders::_1, std::placeholders::_2);
    client_->Play("rtsp://192.168.200.1:554/live");
	getchar();
	return 0;
}
